#!/usr/bin/env bash

source "$rvm_scripts_path/functions/requirements/centos"

requirements_fedora_before_update_cache()
{
  __rvm_try_sudo yum clean all || true      # can fail to clean
  __rvm_try_sudo yum makecache || return $? # but must rebuild cache
}

requirements_fedora_before()
{
  requirements_centos_lib_available_no_caching yum ||
    rvm_requiremnts_fail_or_run_action 2 \
      "It is not possible to check if packages are installed, make sure the cache is up to date with 'yum makecache' and try again." \
      __rvm_log_command fedora_update_cache "Updating packages cache" requirements_fedora_before_update_cache ||
      return $?
}

requirements_fedora_define_libyaml()
{
  requirements_check libyaml-devel
}

requirements_fedora_define()
{
  __lib_type=centos

  requirements_centos_define "$@"
}
